/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package braipetro.client.regras;

import javax.swing.JOptionPane;

/**
 *
 * @author manasses
 */
public class Foo {
    
    public Foo() {}
    
    private static int count = 0;
    
    public static void mensagem() {
        JOptionPane.showMessageDialog(null, "Chamou metodo mensagem sem parametro");
    }
    
    public static void mensagem(String str) {
        JOptionPane.showMessageDialog(null, str);
    }
    
    public static void mensagem(String str, Integer num){
        JOptionPane.showMessageDialog(null, str + ": " + num.toString());
    }
    
    public static Integer soma(Integer num1, Integer num2){
        return num1 + num2;
    }
    
    public static Integer getX(){        
        count += 10;
        
        System.out.println("contador = " + count);
        
        if (count == 100) count = 0;
        
        return count;
    }
    
    public static void alerta(){
        JOptionPane.showMessageDialog(null, "Estorou");
    }
}
